home *** CD-ROM | disk | FTP | other *** search
- INTERNAT
-
- Version 1.3
-
- William S. Hall
- 3665 Benton Street, #66
- Santa Clara, CA 95051
-
-
- Introduction
-
- INTERNAT is a Microsoft Windows application which can be
- used to demonstrate a number of features of Windows related to
- writing international applications. To use INTERNAT effectively,
- you should be familiar with the Windows Software Development Kit.
-
- INTERNAT starts up with a request to select a language. In
- this version, you can take the default (English) or switch to Pig
- Latin (see below for the necessary files).
-
- The INTERNAT window normally displays the Windows character
- set on the left side if no command has been toggled. The full
- range from 0 to 255 in ascending order is shown with 16
- characters on each line. If a command has been toggled on, the
- display takes on different characteristics as described below.
- In some cases, the OEM character set may be displayed instead of
- Windows ANSI.
-
- If you strike a key on the keyboard, the message parameters
- for WM_KEYDOWN, WM_KEYUP, and WM_CHAR or WM_DEADCHAR are
- displayed on the right side of the Window. These include, in
- order, the repeat count, OEM scan code, and the flags (the high
- word of lParam).
-
- INTERNAT has six basic commands: Windows functions, C
- functions, OEM functions, Information, Language, and Help. In
- this version, Help only serves to display the ubiquitous 'About'
- box. Below we describe the effect of the remaining menus.
-
- As many of the commands change the display, a good way to
- compare the results is to run INTERNAT twice, minimize other
- applications, tile your desktop until the two instances are
- side-by-side, and execute the commands on only one of the
- programs.
-
- INTERNAT does not always follow good enabling techniques in
- string handling. As the program develops, this will hopefully
- improve.
-
-
- The Windows Functions Menu
-
- The behavior of the commands in this group depends on the
- installed language module. Each command uses the Windows
- function call having the same name (or its 'Buff' equivalent).
-
- AnsiUpper converts each character in the Windows character
- set to upper case and displays the result in ascending order.
-
- AnsiLower converts each character in the Windows character
- set to lower case and displays the result in ascending order.
-
- IsCharAlpha displays each alphabetic character in the
- Windows character set in order from 0-255. An underscore is
- shown for each non-alphabetic character.
-
- IsCharAlphaNumeric displays each alphabetic or numeric
- character in the Windows character set in order from 0-255. An
- underscore is shown for non-alphanumeric characters.
-
- IsCharUpper displays each alphabetic character in the
- Windows character set in order from 0-255 if it is an upper case
- form. Otherwise an underscore is shown.
-
- IsCharLower displays each alphabetic character in the
- Windows character set in order from 0-255 if it is a lower case
- form. Otherwise an underscore is shown.
-
- lstrcmp sort performs a case-dependent quicksort on the
- Windows character set using the Windows lstrcmp function and
- displays the result in ascending order.
-
- lstrcmpi sort performs a case-independent quicksort on the
- Windows character set using the Windows lstrcmpi function and
- displays the result in ascending order.
-
- lstrcmp test allows you to enter two strings and see the
- effects of both case-dependent and case-independent comparisons.
- You can also observe how various language modules handle special
- cases such as 'ss' (ANSI code point 223), 'ae' (ANSI code point
- 230), and other combinations such as 'ch', 'll', 'ij', etc.
-
- List sort presents you with a dialog box containing a file
- name edit field and two list boxes. Type in the name of a text
- file and select Open. Each line of the file will be entered into
- each list; the one on the left will be sorted according to the
- current language module. The one on the right will be unsorted.
- For best results, use lines of one word each. No horizontal
- scrolling is provided at this time.
- There are five benchmark sample files you can try. These
- files provide culturally correct sorted word lists in several
- languages as well as one special list of mostly scientific
- expressions. Be sure to install the corresponding language
- modules. You will find that Windows does a fair but not perfect
- job of sorting the lists.
-
-
- The C Functions Menu
-
- These commands use the ordinary C-library functions to
- perform the same tasks as the Windows Functions Menu items. They
- are supplied to illustrate the inadequacy of these functions for
- the Windows character set since they operate only on characters
- in the ASCII range. Each function parallels the corresponding
- Windows one and requires no detailed explanation.
-
-
- OEM Functions
-
- These commands illustrate some of the resources available in
- Windows to cope with character set conversions between the
- Windows character set and the underlying MSDOS code page (OEM
- character set).
-
- ANSItoOEM converts each element in a 256 byte buffer
- containing values from 0-255 in ascending order to the
- corresponding ANSI character and displays the result in the OEM
- character set. Because the two character sets do not map onto
- each other, you will see the effects of character folding in the
- resulting display.
-
- OEMtoANSI converts each element in a 256 byte buffer
- containing values from 0-255 in ascending order to the
- corresponding OEM character and displays the result in the
- Windows character set. Because the two character sets do not map
- onto each other, you will see the effects of character folding in
- the resulting display.
-
- OEM Convert shows the effect of the edit box style
- ES_OEMCONVERT (and the corresponding style CBS_OEMCONVERT for
- combo boxes). By typing characters in the edit box, you can see
- how they are converted to the nearest available OEM character in
- the Windows character set and displayed to the user. The
- OEMCONVERT style is usually used in dialogs which manipulate DOS
- files. You can toggle the style on and off with the checkbox.
-
- OEM Character Set displays the OEM font currently in use
- by Windows in ascending order from 0-255.
-
-
- The Information Menu
-
- The commands in this group display miscellaneous information
- available through the Windows API and by reading WIN.INI,
- SYSTEM.INI, and SETUP.INF.
-
- Keyboard Codepage simply shows the code page that Windows
- detected when you initially installed Windows. It does not
- reflect the current code page. Hence this information may not be
- very useful if you are using code page switching from MSDOS. You
- can actually reset your current code page by running Windows
- Setup in the Windows directory from MSDOS and selecting both a
- display and keyboard type. Make the selection, even if you have
- not changed your hardware so that Setup thinks you have actually
- changed something. If you have changed your code page, you will
- be prompted for a diskette containing the needed OEM font.
-
- Keyboard Type reads the type, subtype, and number of
- function keys. Type 1 is an XT keyboard, type 3 is an AT
- keyboard, and type 4 is an extended 101/102 keyboard. See your
- Windows manual for explanations of other types.
-
- Keyboard Layout reads SYSTEM.INI to get the installed
- keyboard table, then looks up the name in SETUP.INF.
-
- International Items reads the current strings and values
- from the [intl] section in win.ini and displays them. You will
- need to consult other sources for a complete interpretation of
- each field. You can also use the International option in the
- Control Panel to observe the effects of changing the various
- parameters.
-
- The Language command allows you to switch into Pig Latin to
- see the effects of language localization. You must have the file
- INTERPGL.DLL somewhere in your path or the switch will not take
- place.
-
- Source code for INTERNAT will be provided on request if you
- cannot get it from a bulletin board or online service.
-